import com.sun.org.apache.xpath.internal.objects.XString;

import java.util.Scanner;
//博哥Java课程第三节
public class Test {
    public static void main(String[] args) {

       /*
       输出1到10之间的数
       int a = 1;
        while( a < 11 ) {

            System.out.println(a);
            a++;
        }*/

/*
输出1到100之间的和
         int b = 1;
        int sum = 0;
        while( b < 101 ) {

            sum += b;
            b++;
        }
        System.out.println(sum);
*/


      /*
      输出5的阶乘
      int a = 1;
        int sum = 1;
        while( a < 6) {

            sum *= a;
            a++;
        }
        System.out.println(sum);*/

      /*
       1到5之间阶乘的和
       int a = 1;
        int sum = 0;
        int ret = 1;
        while( a < 6 ) {

            ret*=a;
            sum+=ret;
            a++;
        }
        System.out.println(sum);
*/
    }
    public static void main3(String[] args) {

   Scanner scanner = new Scanner(System.in);
   int year = scanner.nextInt();
   if( year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {

       System.out.println( year+ "年是闰年");
   } else {
       System.out.println( year+ "年不是闰年");
   }







    }
    public static void main2(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int b = scanner.nextInt();

        int a = 123;
        if ( b % 2 == 0){
            System.out.println( b+" 是偶数 ");
        } else {

            System.out.println( b+" 是奇数 ");
        }
    }
    public static void main1(String[] args) {
        /*System.out.println("Hello!");
        Integer a = 10;
        String str="123";*/

        byte a=-1;
        System.out.println(a >>> 1);

        int q = 10 ;
        switch( q ) {           //swich不能打印复杂的条件，也不能打印long，boolean,float,double
            case 1:
                System.out.println("q == 1");
                break;
            case 2:
                System.out.println("q == 2");
                break;
            case 3:
                System.out.println("q == 3");
                break;
            default:
                System.out.println("qqqqqq");
        }


        String str = "asd";
        switch( str ){
            case "asd" :
                System.out.println(" asd ");
                break;
            case " qwe " :
                System.out.println("qwe");
                break;
            default:
                System.out.println("qqqq");





        }







    }
}
